package com.liujun.spring4.demo.aop.iocset.beanConfig.configuration;


import com.liujun.spring4.demo.aop.iocset.beanConfig.configuration.service.LogonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;

/**
 * 进行数据的配制
 * @author liujun
 * @version 1.0
 * @date 2018-08-20 18:09:00
 */
@Configurable
public class ServiceConfig {

    @Autowired
    private DaoConfig daoConfig;

    @Bean
    public LogonService logonService()
    {
        LogonService logonService = new LogonService() ;
        logonService.setLogDao(daoConfig.logDao());
        logonService.setUserDao(daoConfig.userDao());

        return logonService;
    }
}
